﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;
using GtsServer.Common;

namespace GtsServer.Manage.Controller
{
    public class ChanceTypeController
    {
        ChanceTypeDAL dal = new ChanceTypeDAL();

        public List<ChanceType> GetList(string strWhere = "")
        {
            List<ChanceType> list = new List<ChanceType>();
            DataSet ds = dal.GetList(strWhere);
            list = IListDataSet.DataSetToIList<ChanceType>(ds, 0).ToList();
            return list;
        }

        public bool Add(ChanceType modle)
        {
            return dal.Add(modle);
        }

        public bool Update(ChanceType model)
        {
            return dal.Update(model);
        }

        public bool Delete(int id)
        {
            return dal.Delete(id);
        }
    }
}
